QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next |

Geometry Attribute Set Lists

Labels

ASCII
GeometryAttributeSetList
Binary
gasl ( = 0x6761736C )

Data Format

Uns32               nObjects
PackingEnum         packing
Uns32               nIndices
Uns                 indices[nIndices]
nObjects
The total number of instances of the relevant feature of the parent geometric object possessed by that object. If the parent object is a polyline, the relevant feature is polyline segment, so the value of this field is the total number of segments of the polyline.
packing
See "Face Attribute Set Lists" , for a complete explanation of this field.
nIndices
The size of the following array. See "Face Attribute Set Lists" , for a complete explanation of this field.
indices[]
An array of indices. A standard method of indexing instances of the relevant feature of the parent object is assumed to have been established, as with the segments of a polyline. The values of this field are the indices of such instances and are to be specified in increasing order. See "Face Attribute Set Lists" , for a complete explanation of this field.

Data Size

16 + nIndices * sizeof(Uns) + padding

Description

A geometry attribute set list is used to assign sets of attributes separately and selectively to distinct instances of a tractable feature of geometric objects. A standard method of indexing the instances of such a feature is presupposed by a geometry attribute set list.

At present, the polyline is the only primitive geometric object to which a geometry attribute set list may be attached. The attribute sets appearing in a geometry attribute set list are assigned to the line segments of which the polyline is composed, not to the vertices of the polyline. (To attach attributes to the vertices, use a vertex attribute set list.)

The standard index of the segments of a polyline is described in "Polylines" . To recapitulate, the segment having index i is the segment having as its endpoints vertices[i] and vertices[i+1] .

Parent Hierarchy

Data, attribute set list.

Parent Objects

Polyline (always).

Child Objects

Attribute sets (required). See "Face Attribute Set Lists" , for a complete explanation of how child objects are correlated with instances of the relevant features of the parent geometric object.

Example

Container (
    PolyLine (...)                              #parent geometric object

    Container (
        GeometryAttributeSetList ( )
        6 exclude 4         # there are 6 segments; exclude 4 of them
        0   2   3   5       # indices of the segments to be excluded
        #child objects
        Container (
            AttributeSet            `           #applied to segment 1
            DiffuseColor (...)
        )
        Container (
            AttributeSet                        #applied to segment 4
            DiffuseColor (...)
        )
    )
)

© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next |